const {resolve} = requite('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')


module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'built.js',
    path: resolve(__dirname, 'built') 
  },
  module: {
    rules: [
      {
        test: '/\.css$/',
        use: [
          'css-loader',
          'style-loader'
        ]
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/index.html'
    })
  ],
  mode: 'development',
  devServer: {
    port: 3000,
    open: true
  }
}